CMAKE_MINIMUM_REQUIRED(VERSION 3.28)
PROJECT(tbs_tester LANGUAGES C CXX)
SET(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/runtime)


IF (WIN32)
    MESSAGE(STATUS "WINDOWS PLATFORM")
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
    SET(HEADER_PATH ${CMAKE_SOURCE_DIR}/include)
ELSEIF (APPLE)
    MESSAGE(STATUS "APPLE PLATFORM")
    SET(HEADER_PATH ${CMAKE_SOURCE_DIR}/include /opt/homebrew/include /opt/homebrew/opt/llvm@17/include)
    SET(LIB_PATH ${CMAKE_SOURCE_DIR}/lib /opt/homebrew/lib /opt/homebrew/opt/llvm@17/lib/c++)
    SET(CMAKE_OSX_SYSROOT /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk)
ENDIF ()
INCLUDE_DIRECTORIES(BEFORE ${HEADER_PATH})
LINK_DIRECTORIES(BEFORE ${LIB_PATH})
FILE(GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/**.cpp)
ADD_EXECUTABLE(tbs_tester ${HEADER_PATH} ${SOURCES})
TARGET_LINK_LIBRARIES(tbs_tester PUBLIC tbs_cpp)
